package com.tangsm.spring.boot.springdoc.exception;

/**
 * 自定义系统业务异常类
 *
 * @author tangsm
 * @date 2021-07-27
 */
public class BusinessException extends RuntimeException {
	private static final long serialVersionUID = 1L;

	private Integer code;

	public BusinessException(Integer code, String message) {
		super(message);
		this.code = code;
	}

	public Integer getCode() {
		return code;
	}

	public void setCode(Integer code) {
		this.code = code;
	}

	@Override
	public String toString() {
		return "BusinessException{" + "code=" + code + ", message=" + this.getMessage() + '}';
	}
}
